package vn.team.clipxonxao.request;

import vn.team.clipxonxao.respone.DetailPageRespone;

import com.mk.fw.connection.APIDataResponse;
import com.mk.fw.connection.APIParams;
import com.mk.fw.connection.APIRequest;
import com.mk.fw.connection.APIResponse;

public class DetailPageRequest extends APIRequest {

	private int idCategory;
	private int pageNumber;
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 7133053361337874273L;

	public DetailPageRequest(int idCategory, int pageNumber){
		this.idCategory = idCategory;
		this.pageNumber = pageNumber;
	}
	
	
	
	@Override
	public APIParams getParams() {
		APIParams params = new APIParams();
		params.addParams("cmd", "getlistclip");
		params.addParams("param", "cateid,page");
		params.addParams("cateid", ""+idCategory);
		params.addParams("page", ""+pageNumber);
		return params;
	}

	@Override
	public APIResponse parseResponse(APIDataResponse response) {
		return new DetailPageRespone(response);
	}

}
